
import { Request }  from "../utils/request.js";

// 统一的接口配置文件    方便后期接口更新  维护  

// 登录接口
export  const  login = (data) =>  Request({
    url: `/api/user/login.do`,
    method: "post",
    params:data
})


// 主页统计接口
export  const  home = () =>  Request({
    url: `/api/statistic/base_count.do`,
    method: "get",
    
})

//用户列表
export const user = (data) => Request({
    url: `/api/user/list.do`,
    method: "post",
    params:data
})
//产品接口
export const goods = (data) => Request({
    url: `/api/product/list.do`,
    method: "post",
    params: data
})
//搜索接口
export const search = (data) => Request({
    url: `/api/product/search.do`,
    method: "post",
    params: data
})
//订单接口
export const order = (data) => Request({
    url: `/api/order/list.do`,
    method: "post",
    params: data
})
//订单搜索
export const order1 = (data) => Request({
    url: `/api/order/search.do`,
    method: "post",
    params: data
})
//订单详情
export const order2 = (data) => Request({
    url: `/api/order/detail.do`,
    method: "post",
    params: data
})
//新增商品
export const addComm = (form) => Request({
    url: `/api/product/save.do`,
    method: "post",
    params: form
})
//商品详情
export const detail = (data) => Request({
    url: `/api/product/detail.do`,
    method: "post",
    params: data
})
//获取品类
export const category = (data) => Request({
    url: `/api/category/get_category.do`,
    method: "post",
    params: data
})
//修改品类名称
export const category11 = (data) => Request({
    url: `/api/category/set_category_name.do`,
    method: "post",
    params: data
})
//添加品类
export const getCopy = (data) => Request({
    url: `/api/category/add_category.do`,
    method: "post",
    params: data
})